//结构体指针
#include<iostream>
#include<string.h>

using namespace std;

struct Student
{
	string name;
	int age;
	int score;
};
 
int main()
{
	
	Student s = {"张三",19,100};
	//通过指针指向结构体变量
	Student * p = &s; 
	//通过指针访问结构体变量中的数据
	cout << "姓名：" << p->name<< endl;
	cout << "年龄：" << p->age<< endl;
	cout << "成绩：" << p->score<< endl;
	system("pause"); 
	return 0;
}
